''' 
while循环抄写名字五次
'''

num = 0
while num < 6:
  print("景宝宝")
  num = num + 1

''' 
for循环计算 计算1+2+3+4+5+...+1000的和
'''

sum = 0
for item in range(1, 1001):
  sum = sum + item

print("1+2+3+4+5+...+1000的和是 " + str(sum))

''' 
continue 找出列表[1, 4, 5, 6, 7, 8, 9, 10]中的奇数
'''

list = [1, 4, 5, 6, 7, 8, 9, 10]

for item in list:
  if(item % 2 == 0):
    continue
  print(item)

''' 
break 找出列表[10, 2, 3, 4, 5, 6, 76, 88]中第一个大于40的值
'''

list = [10, 2, 3, 4, 5, 6, 76, 88]

for item in list:
  if(item > 40):
    print(item)
    break 